package ym.ecrm.core.domain.financeManagement;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.customerManagement.Customer;
import ym.ecrm.core.domain.systemManagement.User;

/**
 * 应收账款类
 * @author fage
 *@version 1.0
 */
@Entity
@Table(name = "t_accountsReceivable")
public class AccountsReceivable extends BaseEntity{
	
	/**
	 * accountsReceivableCode 应收账款编号
	 */
	private String accountsReceivableCode;
	/**
	 * state 状态
	 */
	private String state;
	/**
	 * customer 对应客户
	 */
	@ManyToOne(targetEntity = Customer.class
			, cascade = {CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "customerId")
	private Customer customer;
	

	/**
	 * sum 金额
	 */
	private String sum;
	/**
	 * user 负责人
	 */
	@ManyToOne(targetEntity = Customer.class
			, cascade = {CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "userId")
	private User user;
	
	
	
	public String getAccountsReceivableCode() {
		return accountsReceivableCode;
	}
	public void setAccountsReceivableCode(String accountsReceivableCode) {
		this.accountsReceivableCode = accountsReceivableCode;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	public String getSum() {
		return sum;
	}
	public void setSum(String sum) {
		this.sum = sum;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	

}
